﻿namespace MelodysDemo.Core.Models
{
    /// <summary>
    /// 班级信息表
    /// </summary>
    [Table("survey_clazz")]
    [Index("ClazzName", Name = "uk_name")]
    public partial class SurveyClazz
    {
        public SurveyClazz()
        {
            SurveyClazzQuestionnaires = new HashSet<SurveyClazzQuestionnaire>();
        }

        /// <summary>
        /// 自增主键
        /// </summary>
        [Key]
        [Column("id")]
        public long Id { get; set; }
        /// <summary>
        /// 班级名称
        /// </summary>
        [Required]
        [Column("clazz_name")]
        [StringLength(64)]
        public string ClazzName { get; set; }
        /// <summary>
        /// 授课老师
        /// </summary>
        [Required]
        [Column("teacher_name")]
        [StringLength(64)]
        public string TeacherName { get; set; }
        /// <summary>
        /// 班主任
        /// </summary>
        [Required]
        [Column("adviser_name")]
        [StringLength(64)]
        public string AdviserName { get; set; }
        /// <summary>
        /// 学生数量
        /// </summary>
        [Column("student_count")]
        public short StudentCount { get; set; }
        /// <summary>
        /// 班级状态(1:正常，2：结业)
        /// </summary>
        [Column("status")]
        public byte Status { get; set; }
        /// <summary>
        /// 版本号
        /// </summary>
        [Column("version")]
        public long Version { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        [Column("create_time")]
        public DateTime CreateTime { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        [Required]
        [Column("creator")]
        [StringLength(64)]
        public string Creator { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        [Column("modified_time")]
        public DateTime ModifiedTime { get; set; }
        /// <summary>
        /// 修改人
        /// </summary>
        [Required]
        [Column("modifier")]
        [StringLength(64)]
        public string Modifier { get; set; }
        /// <summary>
        /// 是否删除，0：否，1：是
        /// </summary>
        [Column("is_delete")]
        public byte IsDelete { get; set; }

        [InverseProperty("Clazz")]
        public virtual ICollection<SurveyClazzQuestionnaire> SurveyClazzQuestionnaires { get; set; }
    }
}